printf("\n\nWelcome the news forgery Process...\n");
printf("\t- After all data is entered, a confirmation entry will be\n\t\tasked for before the actual connection is made.\n\n");
do {
printf("~ Please enter NNTP server machine name\n\tor %s to exec program: ", QUIT_EXEC);
gets(nntpHost);
if (strcmp(nntpHost, QUIT_EXEC))
{ goodConnect = contact_relay();
switch (goodConnect)
{ case 0: printf("** Could not reach host\n"); break;
case 1: printf("** Host does not accept posting\n"); close(s); break;
default: close(s); break; } }
else
exit(0);
} while (goodConnect != 2);
printf("~ Pseudonym (anything, any format): ");
gets(pseudoSender);
printf("~ Newsgroups to post to, multiple groups seperated\n\tby commas: ");
gets(newsgroups);
printf("~ Subject: ");
gets(subjectLine);
printf("~ Organization: ");
gets(organization);
printf("~ The distribution is defaulted to %s, enter a different one or\n\thit return: ", DIST_DEFAULT);
gets(distribution);
printf("~ Message-ID (ex: 23.23@ninth.circle.hell - *warning* some nntp\n\tservers do not like having this assigned for\n\tthem and will not correctly post because of\n\tit; hit return to skip this item) : ");
gets(messageID);
printf("~ Enter the body below, enter ctrl-d on a blank line to end text entry.\n---------\n");
body = (char *)malloc(2);
sprintf(body,"\n");
while (gets(inputString) != NULL)
{ if (! strcmp(inputString, NNTP_EODATA))
sprintf(inputString,"%s.", NNTP_EODATA);
body = (char *)realloc(body,((strlen(body) + strlen(inputString) + 2) * sizeof(char)));
strcat(body,inputString);
strcat(body,"\n"); }
clearerr(stdin);
printf("\n---------\n**This is the last chance to back out.\n\tContinue with the forgery Process (yes/no)? [no]:");